package com.jefe.bamboo.service.model;

import java.io.Serializable;

import java.util.ArrayList;
import java.util.List;


/**
 * <a href="UserPrefsSoap.java.html"><b><i>View Source</i></b></a>
 *
 * <p>
 * ServiceBuilder generated this class. Modifications in this class will be
 * overwritten the next time is generated.
 * </p>
 *
 * <p>
 * This class is used by
 * <code>com.jefe.bamboo.service.service.http.UserPrefsServiceSoap</code>.
 * </p>
 *
 * @author Brian Wing Shun Chan
 *
 * @see com.jefe.bamboo.service.service.http.UserPrefsServiceSoap
 *
 */
public class UserPrefsSoap implements Serializable {
    private long _id;
    private String _bmbHost;
    private int _bmbPort;
    private String _bmbUser;
    private String _bmbPass;

    public UserPrefsSoap() {
    }

    public static UserPrefsSoap toSoapModel(UserPrefs model) {
        UserPrefsSoap soapModel = new UserPrefsSoap();

        soapModel.setId(model.getId());
        soapModel.setBmbHost(model.getBmbHost());
        soapModel.setBmbPort(model.getBmbPort());
        soapModel.setBmbUser(model.getBmbUser());
        soapModel.setBmbPass(model.getBmbPass());

        return soapModel;
    }

    public static UserPrefsSoap[] toSoapModels(UserPrefs[] models) {
        UserPrefsSoap[] soapModels = new UserPrefsSoap[models.length];

        for (int i = 0; i < models.length; i++) {
            soapModels[i] = toSoapModel(models[i]);
        }

        return soapModels;
    }

    public static UserPrefsSoap[][] toSoapModels(UserPrefs[][] models) {
        UserPrefsSoap[][] soapModels = null;

        if (models.length > 0) {
            soapModels = new UserPrefsSoap[models.length][models[0].length];
        } else {
            soapModels = new UserPrefsSoap[0][0];
        }

        for (int i = 0; i < models.length; i++) {
            soapModels[i] = toSoapModels(models[i]);
        }

        return soapModels;
    }

    public static UserPrefsSoap[] toSoapModels(List<UserPrefs> models) {
        List<UserPrefsSoap> soapModels = new ArrayList<UserPrefsSoap>(models.size());

        for (UserPrefs model : models) {
            soapModels.add(toSoapModel(model));
        }

        return soapModels.toArray(new UserPrefsSoap[soapModels.size()]);
    }

    public long getPrimaryKey() {
        return _id;
    }

    public void setPrimaryKey(long pk) {
        setId(pk);
    }

    public long getId() {
        return _id;
    }

    public void setId(long id) {
        _id = id;
    }

    public String getBmbHost() {
        return _bmbHost;
    }

    public void setBmbHost(String bmbHost) {
        _bmbHost = bmbHost;
    }

    public int getBmbPort() {
        return _bmbPort;
    }

    public void setBmbPort(int bmbPort) {
        _bmbPort = bmbPort;
    }

    public String getBmbUser() {
        return _bmbUser;
    }

    public void setBmbUser(String bmbUser) {
        _bmbUser = bmbUser;
    }

    public String getBmbPass() {
        return _bmbPass;
    }

    public void setBmbPass(String bmbPass) {
        _bmbPass = bmbPass;
    }
}
